import { updateLoginUserAvateraURL } from '@/views/loginUser/loginUserInfoApi'

export default {
    column: [{
        label: '个人信息',
        prop: 'info',
        option: {
            submitText: '修改',
            column: [{
                label: '头像',
                type: 'upload',
                listType: 'picture-img',
                propsHttp: {
                    name: 'name',
                    url: 'url'
                },
                canvasOption: {
                    text: 'Douzoo',
                    ratio: 0.1
                },
                action: updateLoginUserAvateraURL,
                tip: '只能上传jpg/png用户头像，且不超过500kb',
                span: 12,
                row: true,
                prop: 'avatar'
            }, {
                label: '姓名',
                span: 6,
                row: true,
                prop: 'userName'
            }, {
                label: '身份证号',
                span: 12,
                row: true,
                prop: 'idCard'
            }, {
                label: '用户账号',
                span: 12,
                row: true,
                prop: 'account'
            }, {
                label: '手机号',
                span: 12,
                row: true,
                prop: 'phone'
            }, {
                label: '邮箱',
                span: 12,
                row: true,
                prop: 'email'
            },{
                label: '家庭住址',
                prop: 'detail',
                span: 24,
                row: true,
                type: 'address',
                minRows: 5,
                maxRows: 8,
            }]
        }
    }, {
        label: '修改密码',
        prop: 'password',
        option: {
            submitText: '修改',
            column: [{
                label: '原密码',
                span: 12,
                row: true,
                type: 'password',
                prop: 'oldpassword'
            }, {
                label: '新密码',
                span: 12,
                row: true,
                type: 'password',
                prop: 'newpassword'
            }, {
                label: '确认密码',
                span: 12,
                row: true,
                type: 'password',
                prop: 'newpasswords'
            }]
        }
    }]
}